package com.naiterui.ehp.bp.utils.payment.bo;

import java.io.Serializable;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;

import org.hibernate.validator.constraints.Length;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import io.swagger.annotations.ApiModelProperty;

/**
 * <pre>
 * 退款请求对象
 * </pre>
 *
 * @author 王泽浩
 * @since 1.0.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SuppressWarnings({"unused", "WeakerAccess"})
public class RefundRequestBO implements Serializable {
    private static final long serialVersionUID = -652555434285806304L;
    /**
     * <pre>
     * 字段名：商户订单号
     * 是否必填：是
     * 类型：String(32)
     * 示例值：20150806125346
     * 描述：商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号
     * </pre>
     */
    @NotEmpty(message = "商户订单号不能为空")
    @Length(max = 30, message = "商户订单号长度不能大于30")
    @ApiModelProperty(value = "商户订单号", required = true)
    private String orderSn;

    @NotEmpty(message = "退款单号不能为空")
    @Length(max = 30, message = "退款单号长度不能大于30")
    @ApiModelProperty(value = "退款单号", required = true)
    private String refundOrderSn;

    /**
     * <pre>
     * 字段名：总金额
     * 变量名：totalFee
     * 是否必填：是
     * 类型：Int
     * 示例值： 888
     * 描述：订单总金额，单位为分，详见支付金额
     * </pre>
     */
    // @NotNull(message = "订单金额不能为空")
    // @Min(value = 1, message = "订单金额最少是1分钱")
    @ApiModelProperty(value = "订单总金额，单位为分", required = true)
    private Integer totalFee;

    /**
     * <pre>
     * 退款金额
     * refundFee
     * 是
     * Int
     * 100
     * 退款总金额，订单总金额，单位为分，只能为整数，详见支付金额
     * </pre>
     */
    // @NotNull
    @Min(1)
    @ApiModelProperty(value = "退款金额，单位为分", required = true)
    private Integer refundFee;

    /**
     * <pre>
     * 退款成功，业务回调地址
     * notifyBusinessUrl
     * 是
     * Int
     * http://ap.ehp.naiterui.com/test
     * 业务回调地址
     * </pre>
     */
    @NotEmpty(message = "业务回调地址不能为空")
    @ApiModelProperty(value = "退款成功，业务回调地址", required = true)
    private String notifyBusinessUrl;
}
